#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    connect(this,&Widget::mysignals,this, &Widget::handleclicked);
}

Widget::~Widget()
{
    delete ui;
}

//ui界面的按钮，想要实现通过按钮点击然后修改界面标题
void Widget::on_pushButton_clicked()
{
    QString q="修改标题成功";
    move(300,600);
    emit  Widget::mysignals(q);
}
void  Widget::handleclicked(QString &text)
{
    this->setWindowTitle(text);

}
